import request from '@/utils/request'
// 获取列表数据
export const getExamList = (params) => {
  return request({
    method: 'get',
    url: '/admin/exam/exam',
    params
  })
}

// 获取树结构数据
export const gettreeList = () => {
  return request({
    method: 'get',
    url: '/admin/subject/tree'
  })
}

// 删除试卷
export const delExam = (id) => {
  return request({
    method: 'DELETE',
    url: `/admin/exam/exam/${id}`
  })
}
// 解除绑定
export const bindClass = data => {
  return request({
    method: 'POST',
    url: 'admin/exam/exam/bindClass',
    data
  })
}
// class_id,del:true,exam_id===解绑
// class_id,exam_id,main_paper_id===绑定
// 获取班级数据
export const getClassList = params => {
  return request({
    method: 'GET',
    url: '/admin/class/class',
    params
  })
}
// 新增考试
export const addExam = data => {
  return request({
    method: 'POST',
    url: '/admin/exam/exam',
    data
  })
}
// 获取试卷列表
export const getExamPaperList = params => {
  return request({
    method: 'GET',
    url: '/admin/exam/paper',
    params
  })
}

// 亚辉的获取题库接口 admin/exam/question
// export const getMultipleQuestionList = params => {
//   return request({
//     method: 'GET',
//     url: 'admin/exam/question',
//     params
//   })
// }
